<template>
  <el-card shadow="never" style="margin-bottom:20px;">
    <div slot="header" class="clearfix">
      <span>中心内部信息交流</span>
      <div style="float: right; padding: 3px 0" type="text">
        <a @click="showDetails()">查看全部 &gt;</a>
      </div>
    </div>
    <el-table :show-header="false" :data="users" class="left_menu_side">
      <el-table-column prop="Ic_Subject" :show-overflow-tooltip="true" label="标题">
        <template slot-scope="scope">
          <a @click="getMore(scope.row)" >{{scope.row.Ic_Subject}}</a>
        </template>
      </el-table-column>
      <el-table-column prop="Uo_Name" label="发布部门"></el-table-column>
      <el-table-column prop="Ic_SendDate" label="发布时间" width="180" align="right"></el-table-column>
    </el-table>
  </el-card>
</template>

<script type="text/javascript">
  import {ACCESS_TOKEN} from "@/store/mutation-types"
  import Vue from 'vue'
  import {handleUrl,openIFrame} from '@/utils/util'
  export default {
    name: 'exchange',
    data () {
      return {
        users:[]
      }
    },
    mounted(){
      this.getAdminList()
    },
    methods:{
      getMore(row) {
        let baseUrl = process.env.VUE_APP_PORTAL_API;
        let id = row.Ic_Id;
        let ReturnUrl = encodeURIComponent('/InnerCommunionView.xip?IcId='+ id);
        let title = row.Ic_Subject;
        let url = baseUrl + "/login.xip?LoginMethod=portalletlogin&Userid=1&ReturnUrl=" + ReturnUrl;
        openIFrame('InnerCommunionView-'+id, '/InnerCommunionView/' + id, title, url);
        this.$router.push({ name: 'InnerCommunionView-'+id })
      },
      showDetails() {
        let baseUrl = process.env.VUE_APP_PORTAL_API;
        let url = baseUrl + '/login.xip?LoginMethod=portalletlogin&Userid=1&ReturnUrl=/InnerCommunionHomePage.xip#';
        let title = '中心内部信息沟通平台';
        openIFrame("InnerCommunionHomePage", '/InnerCommunionHomePage', title, url);
        this.$router.push({ name: "InnerCommunionHomePage" })
      },
      getAdminList(){
        let that = this;
        let params = {
          serviceName:'Xinfo.Bus.BL.Service.EgovPlatform.SHIJU.PortalLet.InnerCommunionPortalLetService,Xinfo.Bus.BL.Service',
          getCount:false,
          guid:'xxzx_zxnbxxjl',
          intTypeId:0,
          strBizType:''
        }
        this.getRequest('/PortalLet/GetPortalLetData',params).then(res => {
          that.users=res.data;
        })
      }
    }
  }
</script>